<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>退回供货单位出库单</title>
	<meta name="decorator" content="default"/>
	<script type="text/javascript">
		$(document).ready(function() {
			
		});
		function page(n,s){
			$("#pageNo").val(n);
			$("#pageSize").val(s);
			$("#searchForm").submit();
        	return false;
        }
		
		
		function change(){
			
			var url = "${ctx}/vaccinate/bsProduct/findbatchByVacc";
			$.ajax({
				url:url,
				data:{"vaccId":$("#vaccineid").val()},
				success:function(data){
					
					var html = "";
					var htmll =""
					$.each(data,function(i,t){
						html += "<option>" + t.batchno + "</option>"
						
					});
					
					 var companyNameT = "_";
					$.each(data,function(i,t){
						if(companyNameT.indexOf(t.companyName) < 0){
							htmll += "<option>" + t.companyName + "</option>"
							companyNameT += t.companyName + "_";
						}
						
					}); 
					$("#batchno").html("<option value=''>--请选择--</option>");
					$("#companyName").html("<option value=''>--请选择--</option>");
					$("#companyName").html(htmll);
					$("#batchno").html(html);
					
				}
				
			});
		}
		
		function down(){
			top.$.jBox.confirm("确认要导出出入库数据吗？","系统提示",function(v,h,f){
				if(v=="ok"){
					$("#searchForm").attr("action","${ctx}/vaccinate/bsProduct/export");
					$("#searchForm").submit();
				}
			},{buttonsFocus:1});
			top.$('.jbox-body .jbox-icon').css('top','55px');
		}
		
		function deleteRecord(id){
// 			alert(id);
			var url = "${ctx}/vaccinate/bsProduct/deleteRecord";
			$.ajax({
				url : url,
				data : {"id": id},
				success :function(data){
					
				}
			});
		}
		
	</script>

	<style type="text/css">
		.minWidth {
			min-width: 177px;
		}	
	</style>
</head>
<body>
	<ul class="nav nav-tabs">
		<li class="active"><a href="${ctx}/vaccinate/bsProduct/">退回供货单位出库单</a></li>
	
	</ul>
	<form:form id="searchForm" modelAttribute="bsProduct" action="${ctx}/vaccinate/bsProduct/queryRecordList" method="post" class="breadcrumb form-search">
		<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
		<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
	
		<ul class="ul-form breadcrumb">
			
			<li class="btns">
			<a href="${ctx}/vaccinate/bsProduct/queryRecordList" class="btn btn-primary">继续退回</a>
			</li>
			<li class="clearfix"></li>
			<li class="btns">
			<a href="${ctx}/vaccinate/bsProduct/queryRecordList" class="btn btn-primary">返回列表</a>
			</li>
			<li class="clearfix"></li>
		</ul>
	</form:form>
	
	<sys:message content="${message}"/>
	<table id="contentTable" class="table table-striped table-bordered table-condensed">
		<thead>
			<tr>
				
				<th>操作</th>
				<th>出入库类型</th>
				<th>出入库单号</th>
				<th>出入库日期</th>
				<th>供货单位</th>
				<th>收货单位</th>
				
			</tr>
		</thead>
		<tbody>
		<c:set var="index" value="0"/>
		<c:forEach items="${page.list}" var="records">
			<tr>
				
				<td>
					<c:set var="index" value="${index+1}" />
					${index }  
				</td>
				<td>
					${records.bsVaccineInfo.vaccineName}
				</td>
				<td>
					${records.bsVaccineInfo.type1}
				</td>
				<td>
					${records.bsVaccineInfo.companyName}
				</td>
				<td>
					${records.bsVaccineBatchno.batchno}
				</td>
				<td>
					${records.bsVaccineInfo.spec1}
				</td>
				
				<td>
					<fmt:formatDate value="${records.product.updateDate}" pattern="yyyy-MM-dd HH:mm:ss"	/>
				</td>
			
			</tr>
		</c:forEach>
		
		</tbody>
	</table>
	<div class="pagination">${page}</div>
</body>
</html>